# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=boxes
pkgver=2.3.1
pkgrel=0
pkgdesc="Text mode box and comment drawing filter"
url="https://boxes.thomasjensen.com"
arch="all"
license="GPL-2.0"
makedepends="bison flex libunistring-dev
pcre2-dev ncurses-terminfo cmocka-dev"
checkdepends="bash lcov"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/ascii-boxes/boxes/archive/refs/tags/v$pkgver.tar.gz
remove-failing-test.patch"

build() {
	make -j1 GLOBALCONF=/etc/boxes-config
}

check() {
	make test
}

package() {
	install -D -m 644 doc/boxes.1 $pkgdir/usr/share/man/man1/boxes.1
	install -D -m 644 boxes-config $pkgdir/etc/boxes-config
	install -D -m 755 out/boxes $pkgdir/usr/bin/boxes
}

sha512sums="
cfb772c11d4bc169f1a6cc7f550af02947e4fee43cd70cb8ec7c8f9c976d9e59bc017d4b40b77ba60d2c52a76fd826d0a2b962b3dc02021407ca4f0cbcb316d8  boxes-2.3.1.tar.gz
59e8c5219da02a7390957f74add351a1cad73d60d002e239dbb13a741ba7fe1d72e112f2b750cd843e899d6f2521c0a6a2bea300a7287e6329fa9c42a45cd0de  remove-failing-test.patch
"
